<%@ page import="serverDB.*" %>
<%@ page import="java.util.List" %>
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CleverDropBox</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/cufon-yui.js"></script>
<script type="text/javascript" src="js/arial.js"></script>
<script type="text/javascript" src="js/cuf_run.js"></script>
</head>
<body>
<% 
	Cookie[] cookiesList = request.getCookies();
	if(cookiesList!=null){
		for(Cookie cookie : cookiesList){
			if(cookie.getName().equals("cleverDropBoxCookie")&&cookie.getValue()!=null){
				session.setAttribute("logedIn",true);
				session.setAttribute("userName", cookie.getValue());
				ConnectToDataBase connectToDataBase = ConnectToDataBase.getInst();
				List<Client> list=connectToDataBase.getClient2("from Client where user_name= '"+cookie.getValue()+"'");
				session.setAttribute("boxesList", list.get(0).getBoxes());
			}
		}
	}
	session.setAttribute("numOfSearch", 1);
	if(session.getAttribute("logedIn")!=null&&(Boolean)session.getAttribute("logedIn"))
		response.sendRedirect("logedIn2.jsp");	
%>
<div class="main">
  <div class="header">
    <div class="header_resize">
      <div class="logo">
        <h1><a href="index.jsp">Clever<span>DropBox</span></a></h1>
      </div>
      <div class="menu_nav">
        <ul>
          <li class="active"><a href="index.jsp"><span>Home</span></a></li>
          <li><a href="users.jsp"><span>Users</span></a></li>
          <li><a href="support.html"><span>Support</span></a></li>
          <li><a href="aboutUs.jsp"><span>About Us</span></a></li>
          <li><a href="contactUs.jsp"><span>Contact Us</span></a></li>
        </ul>
        <div class="clr"></div>
      </div>
      <div class="clr"><span class="header_img"><img src="images/dropbox.png" alt="" width="271" height="234" /></span></div>
      <div class="header_img">
        <h2>Your life's work, wherever you are.</h2>
        <p>
          Dropbox makes all your files available to you from any computer or phone. It’s as easy as adding any file 
to your Dropbox folder. You can start working at the office and finish from home without ever needing 
to think about where your files are -- they are always with you. </p>
        <div class="clr"></div>
      </div>
    </div>
  </div>
  <div class="clr"></div>
  <div class="content">
   
    <div class="content_resize">
      <div class="mainbar">
        <div class="article">
          <h2><span>What is Dropbox?</span></h2>
          <div class="clr"></div>
          <img src="images/downloading3.png" alt="" width="280" height="224" align="middle" />

          <p>Dropbox is a free service that lets you bring all your photos, docs, and videos anywhere. This means that any file you save to your Dropbox will automatically save to all your computers, phones and even the Dropbox website. Dropbox also makes it super easy to share with others, whether you're a student or professional, parent or grandparent. Even if you accidentally spill a latte on your laptop, have no fear! You can relax knowing that Dropbox always has you covered, and none of your stuff will ever be lost. </p>
</div>
        
        <div class="article">
          <h2><span>How Dropbox works</span></h2>
          <div class="clr"></div>
          <p>Joining Dropbox is easy: installing the Dropbox software (free for Windows, Mac and Linux) creates a 
special folder on your computer. Anything you add to this Dropbox folder will automatically save to 
all your computers and to the Dropbox website. You can also invite people to share any folder in your 
Dropbox. This makes Dropbox perfect for team projects or sharing photos with family or friends -- it will 
be as if you are saving straight to their desktop. The Dropbox mobile apps (free for iPhone, Android and 
Blackberry) let you take your life on the road. And because Dropbox keeps a one month history of your 
work, you can go back in time to fix mistakes or rescue deleted files</p>
        </div>
        
      </div>
      <div class="sidebar">
      
      <form action="isClientExistServlet" method="post" id="sendemail">
          <ol>
          	  <li>
                   <label for="login"><h3>Log in:</h3></label>
              </li>
              <li>
                  <label for="userName">User Name:</label>
                  <input id="userName" name="userName" class="text" />
              </li>
              <li>
                  <label for="pass">Password:</label>
                  <input type="password"  id="pass" name="pass" class="text" />
                  <div class="clr"></div>
              </li>
              <% if(session.getAttribute("error")!=null){%>
          	  <li class = "error">
            	  <% out.println(session.getAttribute("error"));
            	  	 session.removeAttribute("error");
            	  %>
              </li>
            	  <%} %>
              <li>
            	  <input type="checkbox" name="remember" value="remember me" title="remember me" /> Remember Me
              </li>
              <li>
                  <input type="image" name="imageField" id="imageField" src="images/login.gif" class="send" />
                  <div class="clr"></div>
                  <a href="createAccount.jsp">create an account</a>
                  <div class="clr"></div>
              </li>
              
          </ol>
      </form>
       
       
      </div>
      <div class="clr"></div>
    </div>
  </div>
  <div class="fbg">
    <div class="fbg_resize">
      
    </div>
    <div class="footer">
      <p class="lf">&copy; Copyright <a href="#">MyWebSite</a>.</p>
      <p class="rf">Layout by Cool <a href="http://www.coolwebtemplates.net/">Website Templates</a></p>
      <div class="clr"></div>
    </div>
  </div>
</div>
</body>
</html>
